rom django.db import models
'''
        Information:资讯表
                title:标题
                content:内容
                date:日期
                types:资讯分类ID
                users：用户ID
                power:查看权限
                state:审核状态
                filename:文件名
                isDelete:删除文章
                route:文件夹路径
'''
# Create your models here.
class Information(models.Model):
        title=models.CharField(max_length=100)
        content=models.CharField(max_length=2000)
        date=models.DateTimeField(auto_now=True)
        types=models.ForeignKey(to='Type',on_delete=models.CASCADE)
        users=models.ForeignKey(to='User',on_delete=models.CASCADE)
        power=models.IntegerField()
        state=models.IntegerField()
        filename=models.CharField(max_length=20)
        isDelete=models.BooleanField(default=False)
        route=models.FieldField(upload_to='/static/information/',max_length=100)
'''
        Type:资讯分类表
                typename:资讯分类名
'''
class Type(models.Model):
        typename=models.CharField(max_length=10)
